package com.zjq.designpatterns.struct.adapter.code.objectadapter2;/*
 * 版权信息: 北京千⾥马网信科技有限公司</br>
 * Copyright ©2008-2018. All rights reserved. 京ICP备16007318号
 */

/**
 * @author jessie
 * @version 1.0
 * @date 2021/1/23
 */
public class PowerAdapter implements DC5{
    AC220 ac220 = new AC220();
    public int outputDC5V() {
        int adapterInput = ac220.outputAC220V();
        //变压器
        int adapterOutput = adapterInput / 44;
        System.out.println("使用PowerAdapter输入AC:"+adapterInput+"V, 输出直流电DC:"+adapterOutput+"V");
        return adapterOutput;
    }
}
